-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add travis integration #15
Add travis integration #15
Conversation
- mv /tmp/terraform ~/bin | ||
- export PATH="~/bin:$PATH" | ||
- export TF_INPUT=false | ||
- export AWS_DEFAULT_REGION="us-east-1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set AWS_DEFAULT_REGION
as per hashicorp/terraform#21408 (comment) to not fail on implicit provider defaults.
script: | ||
- cd $TERRAFORM_DIR | ||
- terraform init | ||
- terraform validate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Travis build matrix to effectively run a pipeline that validates the main & lambda dirs in this repository
@@ -0,0 +1,24 @@ | |||
|
|||
dist: bionic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for going with a particular release of Ubuntu? We've usually just set the os
to linux
and used what Travis defaults to for this but there have been some cases where we've had to use a specific version (e.g. for Java 7 usage).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason in particular other than it's equivalent to the latest version of ubuntu available in travis and to be more explicit in what we call out for the build environment. When we call out linux it looks like it should default to what Travis has set as the default linux image (The current default is ubuntu 16.04
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to make sense, but don't know much about travis so will defer to @massdosage
OK, this should all work now, I've set it up in Travis and triggered a build of master which seems to have worked (https://travis-ci.com/ExpediaGroup/beekeeper-terraform/builds/145387767). Let's keep an eye on the next PR... |
In order to improve the quality of our code base and more easily ensure that any change added to our codebase doesn't break it, we should add a Travis CI job to run
terraform validate
on any PR that is opened against master for Beekeeper-TerraformNote: This won't currently run on this repository until merged, but here is the result in my fork: KenFigueiredo#1